/**
 * 
 */
package safari.model.admin;

import java.sql.SQLException;
import java.util.List;

import safari.model.member.MemberVO;
import safari.model.sell.TradeHistoryVO;

/**
 * @author kosta-00-32
 *
 */
public class AdminServiceImpl implements AdminService {
	private AdminDao dao;
	//AdminServiceImpl 생성자
	public AdminServiceImpl(AdminDao dao) {
		super();
		this.dao = dao;
	}
	/*
	 * 모든 멤버를 출력
	 */
	@Override
	public List<MemberVO> getAllMember() throws SQLException {
		return dao.selectAllMember();
	}
	/*
	 * 아이디로 회원 검색
	 */
	@Override
	public MemberVO findMemberById(String id) throws SQLException {
		return dao.selectMemberById(id);
	}
	/*
	 * 이름으로 회원 검색
	 */
	@Override
	public List<MemberVO> findMemberByName(String name) throws SQLException {
		return dao.selectMemberByName(name);
	}
	/*
	 * 주소로 회원 검색
	 */
	@Override
	public List<MemberVO> findMemberByAddress(String address)
			throws SQLException {
		return dao.selectMemberByAddress(address);
	}
	/*
	 * 모든 거래 내역 출력
	 */
	@Override
	public List<TradeHistoryVO> getAllTradedHistory() throws SQLException {
		return dao.selectAllTradedHistory();
	}

}
